<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案 | 夜悊的技术小宅</title><meta name="author" content="夜悊"><meta name="copyright" content="夜悊"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="前言 文章记录Visual Studio+Qt软件安装及环境配置过程，介绍无法设置Qt路径的解决方案 作者在操作三天三夜后的成功案例和血泪教训…   安装环境 联想拯救者Y7000笔记本电脑 Windows10操作系统   安装哪个版本的Qt、Visual Studio和Qt VS Tools（Visual Studio上的Qt插件）?作者曾安装并搭配过的版本：  Visual Studio201">
<meta property="og:type" content="article">
<meta property="og:title" content="Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案">
<meta property="og:url" content="http://example.com/2022/05/11/Visual%20Studio+Qt%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8F%8A%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E8%BF%87%E7%A8%8B%E5%92%8C%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AEQt%E8%B7%AF%E5%BE%84%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/index.html">
<meta property="og:site_name" content="夜悊的技术小宅">
<meta property="og:description" content="前言 文章记录Visual Studio+Qt软件安装及环境配置过程，介绍无法设置Qt路径的解决方案 作者在操作三天三夜后的成功案例和血泪教训…   安装环境 联想拯救者Y7000笔记本电脑 Windows10操作系统   安装哪个版本的Qt、Visual Studio和Qt VS Tools（Visual Studio上的Qt插件）?作者曾安装并搭配过的版本：  Visual Studio201">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/img/cover9.png">
<meta property="article:published_time" content="2022-05-11T03:25:19.000Z">
<meta property="article:modified_time" content="2023-04-26T07:48:58.135Z">
<meta property="article:author" content="夜悊">
<meta property="article:tag" content="环境配置">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/img/cover9.png"><link rel="shortcut icon" href="/img/favicon2.png"><link rel="canonical" href="http://example.com/2022/05/11/Visual%20Studio+Qt%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8F%8A%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E8%BF%87%E7%A8%8B%E5%92%8C%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AEQt%E8%B7%AF%E5%BE%84%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":50,"languages":{"author":"作者: 夜悊","link":"链接: ","source":"来源: 夜悊的技术小宅","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-04-26 15:48:58'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><link rel="stylesheet" href="/css/my_css.css"><meta name="generator" content="Hexo 7.3.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="/img/avatar.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">92</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">15</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">15</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-bookmark"></i><span> 笔记目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-blog"></i><span> 其他博客</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/m0_62083249"><i class="fa-fw fa fa-link"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/ye-zhe-ning"><i class="fa-fw fa fa-link"></i><span> 知乎</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-sitemap"></i><span> 代码仓库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gitee.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Gitee</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://github.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Github</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about_me/"><i class="fa-fw fas fa-user"></i><span> 关于我</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/cover9.png')"><nav id="nav"><span id="blog-info"><a href="/" title="夜悊的技术小宅"><span class="site-name">夜悊的技术小宅</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-bookmark"></i><span> 笔记目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fa fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-blog"></i><span> 其他博客</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/m0_62083249"><i class="fa-fw fa fa-link"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/ye-zhe-ning"><i class="fa-fw fa fa-link"></i><span> 知乎</span></a></li></ul></div><div class="menus_item"><a class="site-page group hide" href="javascript:void(0);"><i class="fa-fw fa fa-sitemap"></i><span> 代码仓库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gitee.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Gitee</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://github.com/yezhening"><i class="fa-fw fa fa-link"></i><span> Github</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about_me/"><i class="fa-fw fas fa-user"></i><span> 关于我</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-05-11T03:25:19.000Z" title="发表于 2022-05-11 11:25:19">2022-05-11</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-04-26T07:48:58.135Z" title="更新于 2023-04-26 15:48:58">2023-04-26</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/">环境配置</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><ul>
<li>文章记录Visual Studio+Qt软件安装及环境配置过程，介绍无法设置Qt路径的解决方案</li>
<li><strong>作者在操作三天三夜后的成功案例和血泪教训…</strong></li>
</ul>
<hr>
<h1 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h1><ul>
<li>联想拯救者Y7000笔记本电脑</li>
<li>Windows10操作系统</li>
</ul>
<hr>
<h1 id="安装哪个版本的Qt、Visual-Studio和Qt-VS-Tools（Visual-Studio上的Qt插件）"><a href="#安装哪个版本的Qt、Visual-Studio和Qt-VS-Tools（Visual-Studio上的Qt插件）" class="headerlink" title="安装哪个版本的Qt、Visual Studio和Qt VS Tools（Visual Studio上的Qt插件）?"></a>安装哪个版本的Qt、Visual Studio和Qt VS Tools（Visual Studio上的Qt插件）?</h1><p>作者曾安装并搭配过的版本：</p>
<ul>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.4.3</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.5.1</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.5.2</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.6.0</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.7.1</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.7.2</li>
<li>Visual Studio2019+Qt5.14.2+Qt VS Tools2.8.1</li>
<li>Visual Studio2022+Qt5.14.2+Qt VS Tools2.8.1（只有Qt VS Tools2.8.1有对应Visual Studio2022的.vsix文件）</li>
<li>Visual Studio2022+Qt6.6.4（好像是6.6.4，或者是6.4.0）+Qt VS Tools2.8.1</li>
</ul>
<p>重点考虑在Visual Studio中无法设置Qt路径，兼顾考虑版本性能、稳定性、兼容性等问题，<strong>成功案例的安装版本如下：</strong></p>
<ul>
<li>Visual Studio2019</li>
<li>Qt5.14.2</li>
<li>Qt VS Tools2.4.3</li>
</ul>
<hr>
<h1 id="Qt5-14-2"><a href="#Qt5-14-2" class="headerlink" title="Qt5.14.2"></a>Qt5.14.2</h1><p>教程请见作者的这篇文章：<a target="_blank" rel="noopener" href="https://editor.csdn.net/md/?articleId=124651849">Qt5.14.2版本安装教程</a></p>
<hr>
<h1 id="Visual-Studio2019"><a href="#Visual-Studio2019" class="headerlink" title="Visual Studio2019"></a>Visual Studio2019</h1><h2 id="官网"><a href="#官网" class="headerlink" title="官网"></a>官网</h2><p><a target="_blank" rel="noopener" href="https://my.visualstudio.com/Downloads?q=visual%20studio%202019&wt.mc_id=o~msft~vscom~older-downloads">Downloads - Visual Studio Subscriptions Portal</a></p>
<h2 id="下载"><a href="#下载" class="headerlink" title="下载"></a>下载</h2><p><img src= "" data-lazy-src="/../img/vs_qt/0f838ae658114146a99139e46e470670.png"></p>
<ul>
<li>选择：Visual Studio Community 2019 (version 16.11)</li>
<li>需要注意的参数：1.社区版，2.版本号，3.操作系统位数</li>
<li>有其他需求的可自选</li>
<li>点击Download下载.exe可执行文件</li>
</ul>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><ul>
<li>根据安装引导程序进行即可。安装步骤简单，不再过多截图</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/08a9778460564e58a6d44384d4c7cac7.png"></p>
<ul>
<li>组件选择：使用C++的桌面开发</li>
<li>有其他需求的可自选</li>
<li>注意安装路径（不建议安装在C盘）</li>
</ul>
<hr>
<h1 id="Qt-VS-Tools2-4-3（Visual-Studio上的Qt插件）"><a href="#Qt-VS-Tools2-4-3（Visual-Studio上的Qt插件）" class="headerlink" title="Qt VS Tools2.4.3（Visual Studio上的Qt插件）"></a>Qt VS Tools2.4.3（Visual Studio上的Qt插件）</h1><h2 id="官网-1"><a href="#官网-1" class="headerlink" title="官网"></a>官网</h2><p><a target="_blank" rel="noopener" href="https://download.qt.io/archive/vsaddin/">Index of &#x2F;archive&#x2F;vsaddin (qt.io)</a></p>
<h2 id="下载-1"><a href="#下载-1" class="headerlink" title="下载"></a>下载</h2><p><img src= "" data-lazy-src="/../img/vs_qt/2263c07994bd4d31b0662211323ba544.png"></p>
<ul>
<li>点击qt-vsaddin-msvc2019-2.4.3.vsix下载文件</li>
</ul>
<h2 id="安装-1"><a href="#安装-1" class="headerlink" title="安装"></a>安装</h2><ul>
<li>根据安装引导程序进行即可。安装步骤简单，不再过多截图</li>
<li>注意：需关闭Visual Studio 2019</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/908a4401b98c4d8fa4b29d643d372fb5.png"></p>
<ul>
<li>打开Visual Studio 2019</li>
<li>点击上方导航栏的扩展（X）选项</li>
<li>存在Qt VS Tools，表明安装成功</li>
</ul>
<hr>
<h1 id="运行第一个Qt程序"><a href="#运行第一个Qt程序" class="headerlink" title="运行第一个Qt程序"></a>运行第一个Qt程序</h1><p><img src= "" data-lazy-src="/../img/vs_qt/6d0186a7b5ec4386823b6f345c0513e4.png"></p>
<ul>
<li>鼠标悬停在Qt VS Tools选项上</li>
<li>点击Qt Options选项</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/d471a72474404a71904f5c8c7d43a3fc.png"></p>
<ul>
<li>点击Add添加Qt路径</li>
<li>Name：可自定义</li>
<li>Path：下载Qt时指定组件的msvc文件夹</li>
<li>点击ok</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/6dd94c5752c04a09aad5024bdbb9c820.png"></p>
<ul>
<li>点击上方导航栏的文件（F）选项</li>
<li>点击新建（N）选项</li>
<li>点击项目（P）选项</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/6d9295d58f13467290614e637a6a99e0.png"></p>
<ul>
<li>在右上方搜索框输入qt搜索Qt项目</li>
<li>点击Qt GUI Application选项</li>
<li>点击下一步（N）</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/ddf29167d2104e7e8ef2c55f0ece2cff.png"></p>
<ul>
<li>指定项目存放路径</li>
<li>点击创建（C）</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/20635782964e4a72adff2917ecb4f9ed.png"></p>
<ul>
<li>点击Next &gt;</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/894a35f1b06f408098e56842c89f927b.png"></p>
<ul>
<li>默认选项</li>
<li>有其他需求的可自选</li>
<li>点击Next &gt;</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/6aacf3318e724bb898aef970a9294d6e.png"></p>
<ul>
<li>默认选项</li>
<li>有其他需求的可自选</li>
<li>点击Finish</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/3f494cb7a0074cf0ab8b6897e1803ee2.png"></p>
<ul>
<li>Ctrl+F5运行程序</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/2a29617a35724d4885732df3c2531fcf.png"></p>
<ul>
<li>运行成功√</li>
</ul>
<hr>
<h1 id="无法设置Qt路径的解决方案"><a href="#无法设置Qt路径的解决方案" class="headerlink" title="无法设置Qt路径的解决方案"></a>无法设置Qt路径的解决方案</h1><h2 id="报错信息"><a href="#报错信息" class="headerlink" title="报错信息"></a>报错信息</h2><p><img src= "" data-lazy-src="/../img/vs_qt/072ddc61020e48408166613b7baa448f.png"></p>
<ul>
<li>Error reading VS project settings</li>
<li>Stacktrace（堆栈跟踪）显示的是Qt VS Tools即插件的问题（此前作者一直没有仔细读报错信息，以为是Visual Studio和Qt版本不匹配的问题）</li>
</ul>
<h2 id="解决过程"><a href="#解决过程" class="headerlink" title="解决过程"></a>解决过程</h2><ul>
<li>将Qt VS Tools从高往低版本不断安装、设置Qt路径和卸载直到成功</li>
<li>可以发现Qt VS Tools2.8.1报错信息会出现上图的…行号：93文字；Qt VS Tools2.7.2——2.5.1没有上图的…行号：93文字</li>
<li>可以发现Qt VS Tools2.8.1——2.5.1和2.4.3设置Qt路径的界面不同、创建项目时的选项名称不同（Qt Widgets Application和Qt GUI Application）</li>
<li>可以大胆猜测，Qt VS Tools2.8.1，2.7.2——2.5.1，2.4.3三个版本存在一定差异</li>
<li>作者其实是追求使用高、新版本软件的，无奈只能向下兼容，退而求其次选择较低版本</li>
</ul>
<h2 id="解决方案"><a href="#解决方案" class="headerlink" title="解决方案"></a>解决方案</h2><ul>
<li>使用Qt VS Tools2.4.3版本</li>
<li>而Qt VS Tools2.4.3版本只有Visual Studio2015、2017和2019版本的.vsix文件，所以使用最高的Visual Studio2019版本</li>
<li>Qt版本的选择原因已在教程中阐述。可能可以使用Qt6版本，作者未测试过</li>
</ul>
<hr>
<h1 id="针对无法设置Qt路径的必要配置"><a href="#针对无法设置Qt路径的必要配置" class="headerlink" title="针对无法设置Qt路径的必要配置"></a>针对无法设置Qt路径的必要配置</h1><p><img src= "" data-lazy-src="/../img/vs_qt/4054f2b929834dc0960a1d17c665831a.png"></p>
<ul>
<li>点击上方导航栏的扩展（X）选项</li>
<li>点击管理扩展（M）选项</li>
</ul>
<p><img src= "" data-lazy-src="/../img/vs_qt/e0d0953910a54b3aa41a8d563b2eb3a0.png"></p>
<ul>
<li>点击左栏的已安装选项卡</li>
<li>点击中栏的Qt Visual Studio Tools插件</li>
<li>取消勾选右栏的自动更新此扩展（因为无法设置Qt路径是Qt VS Tools插件版本的问题）</li>
<li>点击右下方的关闭（C）</li>
</ul>
<hr>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><ul>
<li>文章记录Visual Studio+Qt软件安装及环境配置过程，介绍无法设置Qt路径的解决方案</li>
<li>**作者在操作三天三夜后的成功案例和血泪教训…**，在此将经验分享给大家~</li>
</ul>
<hr>
<h1 id="作者的话"><a href="#作者的话" class="headerlink" title="作者的话"></a>作者的话</h1><ul>
<li><strong>感谢参考资料的作者&#x2F;博主</strong></li>
<li>作者：夜悊</li>
<li>版权所有，转载请注明出处，谢谢~</li>
<li><strong>如果文章对你有帮助，请点个赞或加个粉丝吧，你的支持就是作者的动力~</strong></li>
<li>文章在描述时有疑惑的地方，请留言，定会一一耐心讨论、解答</li>
<li>文章在认识上有错误的地方, 敬请批评指正</li>
<li>望读者们都能有所收获</li>
</ul>
<hr>
<h1 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h1><p><a target="_blank" rel="noopener" href="https://blog.csdn.net/block999123/article/details/119912647">VS2015+QT插件，新建项目出现error reading VS project settings_RuoChengWang的博客-CSDN博客_vs2015无法新建项目</a></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="http://example.com">夜悊</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="http://example.com/2022/05/11/Visual%20Studio+Qt%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8F%8A%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E8%BF%87%E7%A8%8B%E5%92%8C%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AEQt%E8%B7%AF%E5%BE%84%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/">http://example.com/2022/05/11/Visual Studio+Qt软件安装及环境配置过程和无法设置Qt路径的解决方案/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">夜悊的技术小宅</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/">环境配置</a></div><div class="post_share"><div class="social-share" data-image="/img/cover9.png" data-sites="qq,wechat,weibo"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2022/05/08/Qt5.14.2%E7%89%88%E6%9C%AC%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" title="Qt5.14.2版本安装教程"><img class="cover" src= "" data-lazy-src="/img/cover19.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Qt5.14.2版本安装教程</div></div></a></div><div class="next-post pull-right"><a href="/2022/05/19/%E2%80%9C%E5%AD%98%E5%82%A8%E7%B3%BB%E7%BB%9F%E2%80%9D%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" title="“存储系统”学习笔记"><img class="cover" src= "" data-lazy-src="/img/cover6.png" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">“存储系统”学习笔记</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2022/05/08/Qt5.14.2%E7%89%88%E6%9C%AC%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/" title="Qt5.14.2版本安装教程"><img class="cover" src= "" data-lazy-src="/img/cover19.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2022-05-08</div><div class="title">Qt5.14.2版本安装教程</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content is-expand"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%89%8D%E8%A8%80"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83"><span class="toc-number">2.</span> <span class="toc-text">安装环境</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E5%93%AA%E4%B8%AA%E7%89%88%E6%9C%AC%E7%9A%84Qt%E3%80%81Visual-Studio%E5%92%8CQt-VS-Tools%EF%BC%88Visual-Studio%E4%B8%8A%E7%9A%84Qt%E6%8F%92%E4%BB%B6%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">安装哪个版本的Qt、Visual Studio和Qt VS Tools（Visual Studio上的Qt插件）?</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Qt5-14-2"><span class="toc-number">4.</span> <span class="toc-text">Qt5.14.2</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Visual-Studio2019"><span class="toc-number">5.</span> <span class="toc-text">Visual Studio2019</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%98%E7%BD%91"><span class="toc-number">5.1.</span> <span class="toc-text">官网</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%8B%E8%BD%BD"><span class="toc-number">5.2.</span> <span class="toc-text">下载</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85"><span class="toc-number">5.3.</span> <span class="toc-text">安装</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Qt-VS-Tools2-4-3%EF%BC%88Visual-Studio%E4%B8%8A%E7%9A%84Qt%E6%8F%92%E4%BB%B6%EF%BC%89"><span class="toc-number">6.</span> <span class="toc-text">Qt VS Tools2.4.3（Visual Studio上的Qt插件）</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%98%E7%BD%91-1"><span class="toc-number">6.1.</span> <span class="toc-text">官网</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%8B%E8%BD%BD-1"><span class="toc-number">6.2.</span> <span class="toc-text">下载</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85-1"><span class="toc-number">6.3.</span> <span class="toc-text">安装</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%BF%90%E8%A1%8C%E7%AC%AC%E4%B8%80%E4%B8%AAQt%E7%A8%8B%E5%BA%8F"><span class="toc-number">7.</span> <span class="toc-text">运行第一个Qt程序</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AEQt%E8%B7%AF%E5%BE%84%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88"><span class="toc-number">8.</span> <span class="toc-text">无法设置Qt路径的解决方案</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8A%A5%E9%94%99%E4%BF%A1%E6%81%AF"><span class="toc-number">8.1.</span> <span class="toc-text">报错信息</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E8%BF%87%E7%A8%8B"><span class="toc-number">8.2.</span> <span class="toc-text">解决过程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88"><span class="toc-number">8.3.</span> <span class="toc-text">解决方案</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%92%88%E5%AF%B9%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AEQt%E8%B7%AF%E5%BE%84%E7%9A%84%E5%BF%85%E8%A6%81%E9%85%8D%E7%BD%AE"><span class="toc-number">9.</span> <span class="toc-text">针对无法设置Qt路径的必要配置</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-number">10.</span> <span class="toc-text">总结</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E4%BD%9C%E8%80%85%E7%9A%84%E8%AF%9D"><span class="toc-number">11.</span> <span class="toc-text">作者的话</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99"><span class="toc-number">12.</span> <span class="toc-text">参考资料</span></a></li></ol></div></div></div></div></main><footer id="footer" style="background-image: url('/img/cover9.png')"><div id="footer-wrap"><div class="copyright">&copy;2023 - 2025 By 夜悊</div><div class="footer_custom_text"><a target="_blank" href="https://beian.miit.gov.cn/" >琼ICP备2023001225号-1</a><br><img src= "" data-lazy-src="/img/beian.png"/>&nbsp<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=46010802001221" >琼公网安备 46010802001221号</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="/js/tw_cn.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.8.8/dist/lazyload.iife.min.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js?v=4.13.0"></script></div></div></body></html>